package cn.unknowpupil.init.domain.system;

import cn.unknowpupil.init.configure.mybatisplus.base.ParentEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;


/**
 * Created at 2020-10-20 by  w10g <br>
 * Initialize SysLoginInfo  ... <br>
 *  系统访问记录
 *
 * @author unknowpupil
 * @since 0.0.1
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_login_info")
@ApiModel(value = "SysLoginInfo 域", description = "系统访问记录")
public class SysLoginInfo extends ParentEntity<SysLoginInfo> {

private static final long serialVersionUID=1L;
    /**
     * 用户账号
     */
    @ApiModelProperty(value = "用户账号")
    @TableField(value ="user_name")
    private String userName;
    /**
     * 登录IP地址
     */
    @ApiModelProperty(value = "登录IP地址")
    @TableField(value ="ipaddr")
    private String ipaddr;
    /**
     * 登录地点
     */
    @ApiModelProperty(value = "登录地点")
    @TableField(value ="login_location")
    private String loginLocation;
    /**
     * 浏览器类型
     */
    @ApiModelProperty(value = "浏览器类型")
    @TableField(value ="browser")
    private String browser;
    /**
     * 操作系统
     */
    @ApiModelProperty(value = "操作系统")
    @TableField(value ="os")
    private String os;
    /**
     * 提示消息
     */
    @ApiModelProperty(value = "提示消息")
    @TableField(value ="msg")
    private String msg;
    /**
     * 访问时间
     */
    @ApiModelProperty(value = "访问时间")
    @TableField(value ="login_time")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date loginTime;

    /** 开始时间 */
    @TableField(exist = false)
    @JsonIgnore
    private String beginTime;

    /** 结束时间 */
    @TableField(exist = false)
    @JsonIgnore
    private String endTime;

}